<div id="news">
<center><input type="button" value="Buat Artikel" onclick="location.href='<?php echo base_url() ?>admin/admin_con/edit_news'"/></center>
<br/>
<?php if(isset($news)) {?>
<table align="center" width="100%">
    <thead style="background-color: black; color: white">
        <tr>
            <th>Berita</th>
            <th>Cerita</th>
            <th>Tutorial</th>    
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <?php for($i=0;$i<count($news);$i++){ ?>
                    <?php if($news[$i]['JENIS']=='BERITA'){ ?>
                    <?php echo $news[$i]['JUDUL']?>
                    <br/>
                    <a href="<?php echo base_url()?>admin/admin_con/edit_news/<?php echo $news[$i]['ID_BERITA'] ?>"><img src="<?php echo base_url()?>img/b_edit.png"></a>
                    <a href="<?php echo base_url()?>admin/admin_con/delete_news/<?php echo $news[$i]['ID_BERITA'] ?>"><img src="<?php echo base_url()?>img/b_drop.png"></a>
                    <hr/>
                    <?php } ?>
                <?php } ?>
            </td>
            <td>
                <?php for($i=0;$i<count($news);$i++){ ?>
                    <?php if($news[$i]['JENIS']=='CERITA'){ ?>
                    <?php echo $news[$i]['JUDUL']?>                            
                    <?php } ?>
                <?php } ?>
            </td>
            <td>
                <?php for($i=0;$i<count($news);$i++){ ?>
                    <?php if($news[$i]['JENIS']=='TUTORIAL'){ ?>
                    <?php echo $news[$i]['JUDUL']?>                            
                    <?php } ?>
                <?php } ?>
            </td>
        </tr>
    </tbody>
</table>
<?php } ?>
</div>
